home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / bgui11b.lha / docs / frameclass.doc < prev    next >
Encoding:
Text File  |  1994-12-04  |  8.5 KB  |  302 lines

  1.  
  2.            $RCSfile: frameclass.doc,v $
  3.         Description: Frameclass documentation.
  4.           Copyright: (C) Copyright 1994 Jaba Development.
  5.                      (C) Copyright 1994 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8.             $Author: jaba $
  9.           $Revision: 1.2 $
  10.               $Date: 1994/07/16 17:43:14 $
  11. ------------------------------------------------------------------------------
  12.  
  13. TABLE OF CONTENTS
  14.  
  15. frameclass/--background--
  16. frameclass/Methods
  17. frameclass/Attributes
  18.  
  19. frameclass/--background--                            frameclass/--background--
  20.  
  21.     NAME
  22.         Class:          frameclass
  23.         Superclass:     IMAGECLASS
  24.         Include File:   <libraries/bgui.h>
  25.  
  26.     FUNCTION
  27.         To  provide   a   general   framing  image.  It  has a set of built-in
  28.         framing  and  background  types  and  the  possibility  to  add  hooks
  29.         for custom frames and backgrounds.
  30.  
  31. frameclass/Methods                                          frameclass/Methods
  32.  
  33.     NEW METHODS
  34.         None.
  35.  
  36.     CHANGED METHODS
  37.         None.
  38.  
  39. frameclass/Attributes                                    frameclass/Attributes
  40.  
  41.     NAME
  42.         FRM_Type - ( ULONG )
  43.  
  44.     FUNCTION
  45.         Set  or  get  the  type of the used framing. You can select any of the
  46.         following types:
  47.  
  48.         FRTYPE_CUSTOM --  This is a custom framing type which is automatically
  49.                 set when you supply a framing hook.
  50.  
  51.         FRTYPE_BUTTON -- Standard button gadget frame.
  52.  
  53.         FRTYPE_RIDGE -- Standard string gadget frame.
  54.  
  55.         FRTYPE_DROPBOX -- Standard icon-dropbox frame.
  56.  
  57.         FRTYPE_NEXT -- Standard  NeXT  frame  which  basically  is an inverted
  58.                 (recessed) string gadget frame.
  59.  
  60.         FRTYPE_RADIOBUTTON -- Standard MX gadget frame.
  61.  
  62.         FRTYPE_XEN_BUTTON -- XEN style button frame.
  63.  
  64.         Default is FRTYPE_BUTTON. Applicability is (ISG).
  65.  
  66.     SEE ALSO
  67.         FRM_CustomHook
  68.  
  69.     NAME
  70.         FRM_CustomHook, FRM_BackFillHook -- ( struct Hook * )
  71.  
  72.     FUNCTION
  73.         Set or get custom framing and/or backfilling hooks.  These  hooks  are
  74.         called as follows:
  75.  
  76.         rc = hookFunc( hook, object, message );
  77.         D0             A0    A2      A1
  78.  
  79.         The  message  packet  can  be  a  pointer  to  any  of  the  following
  80.         structures:
  81.  
  82.         struct FrameDrawMsg {
  83.                 ULONG             fdm_MethodID; /* FRM_RENDER */
  84.                 struct RastPort  *fdm_RPort;
  85.                 struct DrawInfo  *fdm_DrawInfo;
  86.                 struct Rectangle *fdm_Bounds;
  87.                 UWORD             fdm_State;
  88.         };
  89.  
  90.         fdm_RPort -- This points to the RastPort in which the frame/background
  91.                 must be rendered.
  92.  
  93.         fdm_DrawInfo --  This  points  to  a  DrawInfo structure as defined in
  94.                 <intuition/screens.h>
  95.  
  96.         fdm_Bounds -- This points to a Rectangle structure in which the bounds
  97.                 of the frame/background are stored.
  98.  
  99.         fdm_State -- This holds the state in which you should render the frame
  100.                 or background.  Please  refer  to <intuition/imageclass.h> for
  101.                 more information about rendering styles.
  102.  
  103.         The  FrameDrawMsg  is  sent to both the custom and backfill hooks when
  104.         they must render.
  105.  
  106.         struct ThicknessMsg {
  107.                 ULONG             tm_MethodID; /* FRM_THICKNESS */
  108.                 struct {
  109.                         UBYTE    *Horizontal;
  110.                         UBYTE    *Vertical;
  111.                 }                 tm_Thickness;
  112.                 BOOL              tm_Thin;
  113.         };
  114.  
  115.         tm_Thickness -- In  this  field  you  must store the thickness  of the
  116.                 frame lines. The thickness requested is the width in pixels of
  117.                 the left OR right border (Horizontal) and the height in pixels
  118.                 of the top OR bottom border (Vertical).
  119.  
  120.         tm_Thin -- This field is added in V38 of the library.  Do  not attempt
  121.                 to read it with lower versions of the  library!  When  set  to
  122.                 TRUE you must give the thickness of  the frame  when it  is in
  123.                 thin (FRM_ThinFrame) mode.
  124.  
  125.         The ThicknessMsg is only sent to the custom frame hook.
  126.  
  127.         The hook routines must return any of the following return codes:
  128.  
  129.         FRC_OK -- OK. Message understood and executed.
  130.  
  131.         FRC_UNKNOWN -- Message not understood. The class will default in  this
  132.                 case.
  133.  
  134.         Defaults are NULL. Applicability is (ISG)
  135.  
  136.     SEE ALSO
  137.         <intuition/screens.h>, <intuition/imageclass.h>
  138.  
  139.     NAME
  140.         FRM_Title -- ( STRPTR )
  141.  
  142.     FUNCTION
  143.         Set  or  get  the  frame  title.  Each  frame can have a title in it's
  144.         top-border. With this attribute you set that title.
  145.  
  146.         Default is NULL. Applicability is (ISG).
  147.  
  148.     SEE ALSO
  149.         FRM_TextAttr
  150.  
  151.     NAME
  152.         FRM_TextAttr -- ( struct TextAttr * )
  153.  
  154.     FUNCTION
  155.         Set  or  get  the  font that is used to render the frame title. Please
  156.         note  that  this font is opened width OpenFont() and must be available
  157.         in memory.
  158.  
  159.     SEE ALSO
  160.         FRM_Title
  161.  
  162.     NAME
  163.         FRM_Flags -- ( ULONG )
  164.  
  165.     FUNCTION
  166.         To initialize any of the following flags:
  167.  
  168.         FRF_EDGES_ONLY -- When  this  flag  is  set  only the frame border are
  169.                 rendered. The background isn't touched.
  170.  
  171.         FRF_RECESSED -- Normally the frame is raised.  With  this flag set the
  172.                 frame is recessed by default.
  173.  
  174.         FRF_CENTER_TITLE -- Normally the frame title is rendered with the text
  175.                 baseline on the top border of the frame. When this flag is set
  176.                 the title is cenetered on the top border of the frame.
  177.  
  178.         FRF_HIGHLIGHT_TITLE -- Normally the frame title is  rendered  with the
  179.                 TEXTPEN. When this flag is set the title is rendered using the
  180.                 HIGHLIGHTTEXTPEN.
  181.  
  182.         FRF_THIN_FRAME -- This  flag, when set,  will  halve  the  size of the
  183.                 vertical borders of the frame.  This  looks  a  lot  better on
  184.                 screens width a 1:1 aspect ratio.
  185.  
  186.         Default is 0. Applicability is (ISG).
  187.  
  188.     SEE ALSO
  189.         <intuition/screens.h>,    FRM_Title,    FRM_EdgesOnly,   FRM_Recessed,
  190.         FRM_CenterTitle, FRM_HighlightTitle, FRM_ThinFrame
  191.  
  192.     NAME
  193.         FRM_FrameWidth -- ( UBYTE )
  194.  
  195.     FUNCTION
  196.         Get the width in pixels of the left or right frame border.
  197.  
  198.         Applicability is (G).
  199.  
  200.     SEE ALSO
  201.         FRM_FrameHeight
  202.  
  203.     NAME
  204.         FRM_FrameHeight -- ( UBYTE )
  205.  
  206.     FUNCTION
  207.         Get the height in pixels of the top or bottom frame border.
  208.  
  209.         Applicability is (G).
  210.  
  211.     SEE ALSO
  212.         FRM_FrameWidth
  213.  
  214.     NAME
  215.         FRM_BackFill -- ( ULONG )
  216.  
  217.     FUNCTION
  218.         Set or get the built-in background type to use.  You can select any of
  219.         the following types:
  220.  
  221.         STANDARD_FILL -- Normal fill as you  would  expect  from the  selected
  222.                 frame type.
  223.  
  224.         SHINE_RASTER -- A raster with the SHINEPEN and BACKGROUNDPEN.
  225.  
  226.         SHADOW_RASTER -- A raster with the SHADOWPEN and BACKGROUNDPEN.
  227.  
  228.         SHINE_SHADOW_RASTER -- A raster with the SHINEPEN and SHADOWPEN.
  229.  
  230.         FILL_RASTER -- A raster with the FILLPEN and BACKGROUNDPEN.
  231.  
  232.         SHINE_FILL_RASTER -- A rster with the SHINEPEN and FILLPEN.
  233.  
  234.         SHADOW_FILL_RASTER -- A raster with the SHADOWPEN and FILLPEN.
  235.  
  236.         SHINE_BLOCK -- A SHINEPEN fill.
  237.  
  238.         SHADOWBLOCK -- A SHADOWPEN fill.
  239.  
  240.         Please  note  that  setting any of the above backfill types except for
  241.         STANDARD_FILL will override the FRM_BackFillHook.
  242.  
  243.         Default is STANDARD_FILL. Applicability is (ISG).
  244.  
  245.     SEE ALSO
  246.         <intuition/screens.h>, FRM_BackFillHook
  247.  
  248.     NAME
  249.         FRM_EdgesOnly -- ( BOOL )
  250.  
  251.     FUNCTION
  252.         Set or clear the FRF_EDGES_ONLY flags.
  253.  
  254.         Default is FALSE. Applicability is (ISG).
  255.  
  256.     SEE ALSO
  257.         FRM_Flags
  258.  
  259.     NAME
  260.         FRM_Recessed -- ( BOOL )
  261.  
  262.     FUNCTION
  263.         Set or clear the FRF_RECESSED flag.
  264.  
  265.         Default is FALSE. Applicability is (ISG).
  266.  
  267.     SEE ALSO
  268.         FRM_Flags
  269.  
  270.     NAME
  271.         FRM_CenterTitle - ( BOOL )
  272.  
  273.     FUNCTION
  274.         Set or clear the FRF_CENTER_TITLE flag.
  275.  
  276.         Default is FALSE. Applicability is (ISG).
  277.  
  278.     SEE ALSO
  279.         FRM_Flags
  280.  
  281.     NAME
  282.         FRM_HighlightTitle -- ( BOOL )
  283.  
  284.     FUNCTION
  285.         Set or clear the FRF_HIGHLIGHT_TITLE flag.
  286.  
  287.         Default is FALSE. Applicability is (ISG).
  288.  
  289.     SEE ALSO
  290.         FRM_Flags
  291.  
  292.     NAME
  293.         FRM_ThinFrame -- ( BOOL )
  294.  
  295.     FUNCTION
  296.         Set or clear the FRF_THIN_FRAME flag.
  297.  
  298.         Default is FALSE. Applicability is (ISG).
  299.  
  300.    SEE ALSO
  301.         FRM_Flags
  302.